<template>
    <el-form-item label="广告系列状态" :prop="`campaign.operation_status`" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
        <el-radio-group v-model="dataForm.campaign.operation_status" size="small" @change="sessionSave" :disabled="disabled">
            <el-radio-button label="ENABLE">开启</el-radio-button>
            <el-radio-button label="DISABLE">关闭</el-radio-button>
        </el-radio-group>
    </el-form-item>
</template>

<script>
export default {
    props: ["dataForm"],
    components: {},
    name: "",
    data() {
        return {
            noset: "",
            disabled:false
        };
    },
     watch: {
            // 开启深度监听  
            dataForm: {  
            handler(newVal, oldVal) {
                this.disabled = newVal.campaign.campaign_id ? true : false
            },  
            deep: true,
            immediate: true, 
            }  
        },
    created() {
        this.$bus.on("tkFormSeries", (value) => {
            this.disabled = value == 'new' ? false : true
        })
    },
    methods: {
        sessionSave(){
            this.$emit("sessionSave")
        }
    },
};
</script>


<style scoped>
</style>

